home *** CD-ROM | disk | FTP | other *** search
- dircmp2 Command
-
-
- Purpose
-
- Compares the contents two directories
-
- Syntax
-
- dircmp2 [ -{cdfhiprt} ] Directory1 [ Directory2 ]
-
- Description
-
- The dircmp2 command compares the two directories and lists all files
- and directories that are found in Directory1 but not in Directory2
- to stdout. Directory entries are treated as equal, if they have the
- same name. If Directory2 is omitted, then the current directory is
- taken.
-
- Flags
-
- -c Compares files found in both directories to decide wheather
- they are equal or not. This is a bytewise comparison
-
- -d Displays only directories
-
- -f Displays only files
-
- -h Displays help page
-
- -i Invert operation, i.e. lists files and directories that can be
- found in both Directory1 and Directory2
-
- -p Shows full pathnames of files from Directory1. See 'Notes'
-
- -r Scans subdirectories, i.e. recursive operation
-
- -t Indents results from a subdirectory scan
-
- Exit Status
-
- This command returns the following exit values:
-
- 0 Successful completion.
-
- 20 An error occurred.
-
- Notes
-
- (I) dircmp2 -i dir1 dir2 is the same as dircmp2 -i dir2 dir1, but
- dircmp2 -i -p dir1 dir2 is NOT the same as dircmp2 -i -p dir2 dir1.
- This can be of vital importance, e.g. if you remove (rm) identical
- files from the list, make sure to remove them from the right
- directory (pathnames are always given for the first directory).
-
- (II) Without -c flag, contents of files with identical names will
- not be compared.
-
- (III) The dircmp2 command differs from the standart implementation
- (dircmp) in the following ways:
-
- (i) The dircmp options are not recognized or have a
- different meaning.
-
- (ii) The dircmp2 command is not able to produce diff-style
- output.
-
- (iii) The dircmp2 command shows only files and directories
- from Directory1. See the note above.
-
- (IV) In recursive operation, i.e. -r flag set, directory names
- will not be shown with one exception: If one or more subdirectories
- are not found in Directory2, only their names are shown, not the
- files they contain.
-
- Examples
-
- 1. dircmp2 -d dir1 dir2
- List all subdirectories of dir1 that cannot be found in dir2
-
- 2. dircmp2 -i -r -t .
- List all identical contents of both the current directory and its
- subdirectories with indentation. Direcory names are not shown
-
- 3. dircmp2 -f -c -i -p dir1 dir2
- List all files identical in dir1 and dir2 with the pathname of
- dir1
-